package org.NooLab.randomgraph.storage.db.iciql;

import com.iciql.Iciql.IQColumn;
import com.iciql.Iciql.IQIndex;
import com.iciql.Iciql.IQIndexes;
import com.iciql.Iciql.IQTable;


@IQTable
@IQIndexes({ @IQIndex({ "compoundlabel" }), @IQIndex({ "rawlabel" })}  )
             

public class Wordfinger {

	@IQColumn(primaryKey = true, autoIncrement =true)
	public Long wordid;

	@IQColumn(length = 40, trim = true)   
	public String guid;        // some external GUID  

	@IQColumn(trim = true)
	public String rawlabel;   // ** the word as string  

	@IQColumn(length=20, trim = true)
	public String storlabel;  /* the symbolic location of a word in a SomStore; this will change dynamically!
    							 any word is stored as a compound label that consists 
    							 from the label (or hash) and its storlabel;
    							 fixed length must be set to "_blank" initially for compatibility 
	 							*/
	@IQColumn(trim = true)
	public String compoundlabel; // the unique compound label **
	
	@IQColumn
	public Integer length;

	@IQColumn
	public Integer frequency ;  // increases +1 via update each time the raw word label has been looked up;

	@IQColumn
	public Double relfreq;      // applies to ALL instances of compounds where rawlabel = wordlabel 
	
    
	@IQColumn(trim = true)
	public String ngram3;    // 

	@IQColumn
	public Long hashkey1;    // these keys reflect the "content"=shape of the word **
	
	@IQColumn
	public Long hashkey2;
	
	@IQColumn
	public Long hashkey3;
	
	
	@IQColumn
	public Integer usedhash;  /* 1..3 , helpful for determining similarity of shape;
    									this we need to create random fingerprints, which are
    									more similar to each other than by random */
	
	@IQColumn(trim = true)
	public String fingerprint; // faster as binary object from serialized ArrayList<> container 
	
}
	
